package com.msb;

/**
 * @author lidexin
 * @create 2021-09-19 13:39
 */
public class T1 {
    private static int count = 10;
    public synchronized  static  void m() {//这里等同于synchronized(T.class)
        count --;
        System.out.println(Thread.currentThread().getName() + "count = " + count);
    }

    public static void m1() {
        synchronized (T.class) { //考虑一下这里写synchronized(this)是否可以
            count --;
        }
    }
}
